package com.ruoyi.grape.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.grape.mapper.GrapeTrendsMapper;
import com.ruoyi.grape.domain.GrapeTrends;
import com.ruoyi.grape.service.IGrapeTrendsService;

/**
 * 庄园动态信息Service业务层处理
 * 
 * @author ld
 * @date 2023-11-18
 */
@Service
public class GrapeTrendsServiceImpl implements IGrapeTrendsService 
{
    @Autowired
    private GrapeTrendsMapper grapeTrendsMapper;

    /**
     * 查询庄园动态信息
     * 
     * @param trendsId 庄园动态信息主键
     * @return 庄园动态信息
     */
    @Override
    public GrapeTrends selectGrapeTrendsByTrendsId(Long trendsId)
    {
        return grapeTrendsMapper.selectGrapeTrendsByTrendsId(trendsId);
    }

    /**
     * 查询庄园动态信息列表
     * 
     * @param grapeTrends 庄园动态信息
     * @return 庄园动态信息
     */
    @Override
    public List<GrapeTrends> selectGrapeTrendsList(GrapeTrends grapeTrends)
    {
        return grapeTrendsMapper.selectGrapeTrendsList(grapeTrends);
    }

    /**
     * 新增庄园动态信息
     * 
     * @param grapeTrends 庄园动态信息
     * @return 结果
     */
    @Override
    public int insertGrapeTrends(GrapeTrends grapeTrends)
    {
        return grapeTrendsMapper.insertGrapeTrends(grapeTrends);
    }

    /**
     * 修改庄园动态信息
     * 
     * @param grapeTrends 庄园动态信息
     * @return 结果
     */
    @Override
    public int updateGrapeTrends(GrapeTrends grapeTrends)
    {
        return grapeTrendsMapper.updateGrapeTrends(grapeTrends);
    }

    /**
     * 批量删除庄园动态信息
     * 
     * @param trendsIds 需要删除的庄园动态信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapeTrendsByTrendsIds(Long[] trendsIds)
    {
        return grapeTrendsMapper.deleteGrapeTrendsByTrendsIds(trendsIds);
    }

    /**
     * 删除庄园动态信息信息
     * 
     * @param trendsId 庄园动态信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapeTrendsByTrendsId(Long trendsId)
    {
        return grapeTrendsMapper.deleteGrapeTrendsByTrendsId(trendsId);
    }
}
